<template>
  <div class="login flex items-center justify-center">
    <login-box class="shadow-lg" @success="onLoginSuccess" @failure="onLoginFailure" />
  </div>
</template>
<script lang="ts" setup>
  import LoginBox from './LoginBox.vue';
  import { useRouter } from 'vue-router';
  import { message } from 'ant-design-vue';

  const router = useRouter();

  function onLoginSuccess() {
    location.reload();
  }

  const onLoginFailure = () => {
    message.error('用户名或密码错误');
  };
</script>
<style scoped lang="less">
  .login {
    min-height: max(100vh, 720px);
    margin-top: -78px;
  }
</style>
